Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional Unit Tests Column Logic #1348

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

anaghshineh
Copy link

Problem

Only the get_nested_column_data_types method in dbt/adapters/bigquery/column.py has unit tests defined. This method relies on other methods to produce its output. These other methods operate recursively and can be difficult to follow for the range of possible inputs (as I found when investigating #1278). Adding more unit tests to ensure the integrity of these recursive methods would provide developers with a lot more confidence when making changes.

Solution

This PR adds many unit tests for the recursive _update_nested_column_data_types method. These will help ensure the integrity of column-related logic, particularly more complex logic around the handling of nested columns.

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX

@anaghshineh anaghshineh requested a review from a team as a code owner September 15, 2024 22:17
@cla-bot cla-bot bot added the cla:yes label Sep 15, 2024
@mikealfare
Copy link
Contributor

closing/re-opening to pickup the ok to test label and run integration tests for a green CI

@mikealfare mikealfare closed this Oct 11, 2024
auto-merge was automatically disabled October 11, 2024 23:20

Pull request was closed

@mikealfare mikealfare reopened this Oct 11, 2024
@mikealfare mikealfare enabled auto-merge (squash) October 11, 2024 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants